package com.bruno.tecnoagenda;

import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.ui.Tree;

/**
 * Árvore de navegação do menu
 * 
 * @author bssantos
 * 
 */
public class NavigationTree extends Tree {
	public static final Object SHOW_ALL = "Mostrar Todos";
	public static final Object SEARCH = "Procurar";

	public NavigationTree(TecnoAgenda app) {
		addItem(SHOW_ALL);
		addItem(SEARCH);

		/*
		 * We want items to be selectable but do not want the user to be able to
		 * de-select an item.
		 */
		setSelectable(true);
		setNullSelectionAllowed(false);
		// Make application handle item click events
		addListener((ItemClickListener) app);

	}

}